<h1>Lista de Empresas</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Email</th>
    <th>Phone</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @enterprises.each do |enterprise| %>
  <tr>
    <td><%= enterprise.name %></td>
    <td><%= enterprise.email %></td>
    <td><%= enterprise.phone %></td>
    <td><%= link_to 'Detalhes', enterprise %></td>
    <td><%= link_to 'Editar', edit_enterprise_path(enterprise) %></td>
    <td><%= link_to 'Delete', enterprise, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'Nova empresa', new_enterprise_path %>
